package com.java0107;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class Reader02 {
    public static void main(String[] args) throws IOException {
        FileReader fileReader = new FileReader("d:/test.txt");

        BufferedReader bufferedReader = new BufferedReader(fileReader);

        String str = "";
        while ((str=bufferedReader.readLine())!=null){
            System.out.println(str);
        }

        bufferedReader.close();
        fileReader.close();
    }
}
